{{include file="Manage/header.html"}}
<body class="regi_body">
    <div class="regi_header">
        <a href="javascript:">培育计划申报</a>
    </div>
    <div class="register">
        <div class="bule_bg">
            <div>重置密码</div>
        </div>
        <form action="index.php?app=Login" name="myform" method="post" class="ajaxSubmit" onsubmit="return false">
            <div class="content">
                <table>
                    <tr>
                        <td>姓名</td>
                        <td><input type="text" name="username"></td>
                        <td class="info">请输入真实姓名</td>
                    </tr>
                    <tr>
                        <td>手机号码</td>
                        <td><input type="text" name="number" id="number"></td>
                        <td class="info">请输入绑定的手机号码</td>
                    </tr>
                    <tr class="get_code">
                        <td>验证码</td>
                        <td>
                            <input type="text" name="code" id="ver">
                            <button onclick="test();">获取验证码</button>
                        </td>
                    </tr>
                    <tr>
                        <td>新密码</td>
                        <td>
                            <input type="password" name="password">
                        </td>
                        <td class="info">密码由6-20位的英文字母、数字和特殊符号组成</td>
                    </tr>
                    <tr>
                        <td>确定密码</td>
                        <td>
                            <input type="password" name="password2">
                        </td>
                        <td class="info">请再次填写一遍密码，以辅助检测密码输入是否正确</td>
                    </tr>
                </table>
                <div class="go_login"><a href="index.php?app=Login&act=index">啊，突然记起来了，快快去登录</a></div>
                <button onclick="post();">确定</button>
            </div>
        </form>
    </div>
    <script type="text/javascript">
        //注册提交
        function post(){
            var sms = getCookie("sms");
            var code = $("#ver").val();
            if(sms == code && sms != ''){
                var params = $("form").serialize();
                $.post('{{"index.php?app=Login&reset"|URL}}',params,function(result){
                    if(result.statusCode=='200'){
                        ui.success(result.message);
                        setTimeout(function(){
                            var url = "{{$smarty.const.__PROJECT__}}Login/index";
                            document.location.href = url;//登录后跳转页面
                        },1000);
                    }else if(result.statusCode=='300'){
                        $("input[name='"+result.message.name+"']").parent().parent().find(".info").addClass("info_w").html(result.message.message);
                    }
                },'json');
            }else if(code == ''){
                ui.error('请先获取并填写验证码！');
                return false;
            }else{
                ui.error('验证码填写错误！');
                return false;
            }
        }

    </script>
{{include file="Manage/footer.html"}}